﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace Habi.Server.Models
{
    [Table("Resources")]
    public class ResourceModel : BaseModel
    {
        public string AboutUrl { get; set; }
        public string Path { get; set; }
        public string Name { get; set; }
        public string Extension { get; set; }
        public long Size { get; set; }
        public string Description { get; set; }
        public int Downloads { get; set; }
        public bool AutoDownload { get; set; }
        public string Publisher { get; set; }
        public long PublisherId { get; set; }

        public int Status { get; set; } = (int)ResourceStatus.Created;
    }

    public enum ResourceStatus
    {
        Created = 0,
        Uploaded = 1,
        Pubilshed = 2,
        Downloaded = 3,
        Deleted = 4,
        Uploading = 5,
        Downloading = 6
    }
}
